#{extends 'magicBox.html' /}


#{set 'title'}
Estimation games
#{/set}

#{list items:components, as:'component'}
<div class= "bar">
#{if component.name.equals("default component")}
Project game
#{/if}
#{else}
${component.getFullName()}
#{/else}
#{if connected.in(component.project).can("startGame")}
<a onClick="overlayOpen('/games/chooseStories?cId=${component.id}');"><img src="@{'/public/images/famfam/add.png'}" title="create a game"/></a>
#{/if}
#{if component.hasRunningGames()}
<a onClick="overlayOpen('/games/chooseGame?cId=${component.id}');"><img src="@{'/public/images/famfam/joystick.png'}" title="join a running game"/></a>
#{/if}
#{else}
<img class="dim" src="@{'/public/images/famfam/joystick.png'}" title="join a running game"/>
#{/else}
</div>
#{/list}